/*
sound_tips.h
offer sound tips api and type define
designed by lunanting

--------------------------
2021-02-01 10:58:19
create file
--------------------------

*/
#include "aos/kernel.h"

/*****************************************config*******************************/
//resource path
#define TIPS_path   "fs:/sdcard/tips"



/*************************************type define**********************************/
//resource encode
typedef enum{
    tips_null=0,
    tips_startup,   //启动完成
    tips_starting,  //启动中
    tips_server_online,    //已连接上服务
    tips_server_offline,   //服务器掉线
    //add here

    //*******************
    tips_common_end,

    //washcar dryer
    tips_collision=100, //发生碰撞
    tips_turner_error,  //举平电机错误
    tips_lifter_error,  //升降电机错误
    tips_lidar_normal,  //雷达正常
    tips_lidar_error,   //雷达不正常
    tips_press_over,    //刷子压停
    tips_serchCar_overTime, //找车超时
    tips_station_online,    //已连接上基站
    tips_station_offline,   //连接不上基站
    tips_brush_freq_error,  //刷子变频器报错
    //add here

    //*********************
    tips_terminal_end,

    //station
    tips_washer_online=200, //基站已连接上洗车机
    tips_washer_offline,    //基站连接不上洗车机
    tips_dryer_online,  //基站已连接上风机
    tips_dryer_offline, //基站连接不上风机
    //add here


    //**********************
    tips_station_end,


}TIPS_type;



//tips type
typedef struct{
    int init;
    aos_sem_t sem;
    TIPS_type type; //tips type
    int cycle;  //cycle times
    int stop;   //stop flag
}TIPS;




/*********************************function extern*********************************/
extern int xp_soundTips_init(void); //init module
extern void xp_soundTips_set(TIPS_type type,int cycle);    //set sound tips
extern char *xp_soundTips_resource_path(TIPS_type type);    //get resource path string
extern void xp_soundTips_clear(void);   //clear tips


// end of the file
